/*
 * Toastr
 * Version 2.0.1
 * Copyright 2012 John Papa and Hans Fjällemark.  
 * All Rights Reserved.  
 * Use, reproduction, distribution, and modification of this code is subject to the terms and 
 * conditions of the MIT license, available at http://www.opensource.org/licenses/mit-license.php
 *
 * Author: John Papa and Hans Fjällemark
 * Project: https://github.com/CodeSeven/toastr
 *
 *
 * SCSS File
 * Author: Damian Szymczuk
 * GitHub: https://github.com/dszymczuk
 *
 */


/* Variables */
$textColor: #ffffff !default;
$textColorHover: #cccccc !default;
$closeButton: #ffffff !default;
$closeButtonHover: #000000 !default;

$fontSize: 20px !default;

$toast: #030303 !default;
$toastSuccess: #51a351 !default;
$toastError: #bd362f !default;
$toastInfo: #2f96b4 !default;
$toastWarning: #f89406 !default;


$toastPositionFullWidthTop: 0 !default;
$toastPositionFullWidthBottom: 0 !default;

$toastPossitionTop: 12px !default;
$toastPossitionLeft: 12px !default;
$toastPossitionRight: 12px !default;
$toastPossitionBottom: 12px !default;

$toastContainerColor: #ffffff !default;
$toastContainerShadowColor: #999999 !default;
$toastContainerShadowColorHover: #000000 !default;


.toast-title {
  font-weight: bold;
}

.toast-message {
  -ms-word-wrap: break-word;
  word-wrap: break-word;
  a, label {
    color: $textColor;
  }
  a:hover {
    color: $textColorHover;
    text-decoration: none;
  }
}

.toast-close-button {
  position: relative;
  right: -0.3em;
  top: -0.3em;
  float: right;
  font-size: $fontSize;
  font-weight: bold;
  color: $closeButton;
  -webkit-text-shadow: 0 1px 0 $closeButton;
  text-shadow: 0 1px 0 $closeButton;
  opacity: 0.8;
  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
  filter: alpha(opacity = 80);
  &:hover, &:focus {
    color: $closeButtonHover;
    text-decoration: none;
    cursor: pointer;
    opacity: 0.4;
    -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
    filter: alpha(opacity = 40);
  }
}

/*Additional properties for button version
 iOS requires the button element instead of an anchor tag.
 If you want the anchor version, it requires `href="#"`.*/

button.toast-close-button {
  padding: 0;
  cursor: pointer;
  background: transparent;
  border: 0;
  -webkit-appearance: none;
}

.toast-top-full-width {
  top: $toastPositionFullWidthTop;
  right: 0;
  width: 100%;
}

.toast-bottom-full-width {
  bottom: $toastPositionFullWidthBottom;
  right: 0;
  width: 100%;
}

.toast-top-left {
  top: $toastPossitionTop;
  left: $toastPossitionLeft;
}

.toast-top-center {
  top: $toastPossitionTop;
}

.toast-top-right {
  top: $toastPossitionTop;
  right: $toastPossitionRight;
}

.toast-bottom-right {
  right: $toastPossitionRight;
  bottom: $toastPossitionBottom;
}

.toast-bottom-center {
  bottom: $toastPossitionBottom;
}

.toast-bottom-left {
  bottom: $toastPossitionBottom;
  left: $toastPossitionLeft;
}

.toast-center {
  top: 45%;
}

#toast-container {
  position: fixed;
  z-index: 999999;
  /*overrides*/
  &.toast-center, &.toast-top-center, &.toast-bottom-center {
    width: 100%;
    pointer-events: none;
  }
  &.toast-center > div, &.toast-top-center > div, &.toast-bottom-center > div {
    margin-left: auto;
    margin-right: auto;
    pointer-events: auto;
  }
  &.toast-center > button, &.toast-top-center > button, &.toast-bottom-center > button {
    pointer-events: auto;
  }
  * {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
  }
  > {
    div {
      margin: 0 0 6px;
      padding: 15px 15px 15px 50px;
      width: 300px;
      -moz-border-radius: 3px 3px 3px 3px;
      -webkit-border-radius: 3px 3px 3px 3px;
      border-radius: 3px 3px 3px 3px;
      background-position: 15px center;
      background-repeat: no-repeat;
      -moz-box-shadow: 0 0 12px $toastContainerShadowColor;
      -webkit-box-shadow: 0 0 12px $toastContainerShadowColor;
      box-shadow: 0 0 12px $toastContainerShadowColor;
      color: $toastContainerColor;
      opacity: 0.8;
      -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
      filter: alpha(opacity = 80);
    }
    :hover {
      -moz-box-shadow: 0 0 12px $toastContainerShadowColorHover;
      -webkit-box-shadow: 0 0 12px $toastContainerShadowColorHover;
      box-shadow: 0 0 12px $toastContainerShadowColorHover;
      opacity: 1;
      -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
      filter: alpha(opacity = 100);
      cursor: pointer;
    }
    .toast-info {
      background-image: url("") !important;
    }
    .toast-wait {
      background-image: url("") !important;
    }
    .toast-error {
      background-image: url("") !important;
    }
    .toast-success {
      background-image: url("") !important;
    }
    .toast-warning {
      background-image: url("") !important;
    }
  }
  &.toast-top-full-width > div, &.toast-bottom-full-width > div {
    width: 96%;
    margin-left: auto;
    margin-right: auto;
  }
}

.toast {
  background-color: $toast;
}

.toast-success {
  background-color: $toastSuccess;
}

.toast-error {
  background-color: $toastError;
}

.toast-info, .toast-wait {
  background-color: $toastInfo;
}

.toast-warning {
  background-color: $toastWarning;
}

/*Responsive Design*/
@media all and (max-width: 240px) {
  #toast-container {
    > div {
      padding: 8px 8px 8px 50px;
      width: 11em;
    }
    .toast-close-button {
      right: -0.2em;
      top: -0.2em;
    }
  }
}

@media all and (min-width: 241px) and (max-width: 480px) {
  #toast-container {
    > div {
      padding: 8px 8px 8px 50px;
      width: 18em;
    }
    .toast-close-button {
      right: -0.2em;
      top: -0.2em;
    }
  }
}

@media all and (min-width: 481px) and (max-width: 768px) {
  #toast-container > div {
    padding: 15px 15px 15px 50px;
    width: 25em;
  }
}

/*
 * AngularJS-Toaster
 * Version 0.3
*/

:not(.no-enter)#toast-container > div.ng-enter, :not(.no-leave)#toast-container > div.ng-leave {
  -webkit-transition: 1000ms cubic-bezier(0.25, 0.25, 0.75, 0.75) all;
  -moz-transition: 1000ms cubic-bezier(0.25, 0.25, 0.75, 0.75) all;
  -ms-transition: 1000ms cubic-bezier(0.25, 0.25, 0.75, 0.75) all;
  -o-transition: 1000ms cubic-bezier(0.25, 0.25, 0.75, 0.75) all;
  transition: 1000ms cubic-bezier(0.25, 0.25, 0.75, 0.75) all;
}

:not(.no-enter)#toast-container > div.ng-enter.ng-enter-active {
  opacity: 0.8;
}

:not(.no-leave)#toast-container > div.ng-leave {
  opacity: 0.8;
  &.ng-leave-active {
    opacity: 0;
  }
}

:not(.no-enter)#toast-container > div.ng-enter {
  opacity: 0;
}
